const app = require('express')() // eslint-disable-line

// 接口代理 可以在此处模拟接口，或者向其他接口发起调用再返回结果
app.get('/api/test', (req, res) => {
  const resJSON = {
    status: 200,
    success: true,
    message: 'this message comes from http://localhost:3000/api/test',
  }
  res.send(JSON.stringify(resJSON))
})

app.listen(3000, () => {
  console.log('接口服务已经启动') // eslint-disable-line
})
